﻿using blackhouse.WebNemo.Business.Groups;
using blackhouse.WebNemo.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace blackhouse.WebNemo.Web {
    /// <summary>
    /// Summary description for NemoDownloadFile
    /// </summary>
    public class NemoDownloadFile : NemoPreviewFile {

        protected override void SetHeadersForFile(HttpResponse response, RecordFile file) {
            response.ContentType = "application/octet-stream";
            response.AddHeader("Content-Disposition", String.Format("attachment; filename=\"{0}\"", file.FileName));
            response.AddHeader("Content-Length", file.FileSize.ToString());
            response.AddHeader("Content-Description", "File Transfer");
            response.AddHeader("Content-Transfer-Encoding", "binary");
        }

    }
}